﻿using BingWallPaper.ViewModels;
using System;
using System.Collections.Generic;
using System.ComponentModel.Composition.Hosting;
using System.Linq;
using System.Text;

namespace BingWallPaper
{
    public class ViewModelLocator
    {
        private CompositionContainer container;

        public ViewModelLocator()
        {
            var catalog = new AssemblyCatalog(System.Reflection.Assembly.GetExecutingAssembly());
            container = new CompositionContainer(catalog);
        }

        public MainViewModel Main { get { return this.container.GetExportedValue<MainViewModel>(); } }
    }
}
